<!DOCTYPE html>
<html>
<head>
    <title>Animation effects</title>
    <meta charset="utf-8">
    <link href="../content/shared/styles/examples-offline.css" rel="stylesheet">
    <link href="../../styles/kendo.common.min.css" rel="stylesheet">
    <link href="../../styles/kendo.rtl.min.css" rel="stylesheet">
    <link href="../../styles/kendo.default.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.min.css" rel="stylesheet">
    <link href="../../styles/kendo.dataviz.default.min.css" rel="stylesheet">
    <script src="../../js/jquery.min.js"></script>
    <script src="../../js/kendo.all.min.js"></script>
    <script src="../content/shared/js/console.js"></script>
    <script>
        
    </script>
    
    
</head>
<body>
    
        <a class="offline-button" href="../index.html">Back</a>
    
    <div id="example">

    <div class="box">
        <h4>Animation Settings</h4>
        <ul class="options">
            <li>
                <input id="toggle" name="animation" type="radio" />
                <label for="toggle">toggle animation</label>
            </li>
            <li>
                <input id="expand" name="animation" type="radio" checked="checked" />
                <label for="expand">expand animation</label>
            </li>
            <li>
                <input id="opacity" type="checkbox" checked="checked" />
                <label for="opacity">animate opacity</label>
            </li>
        </ul>
    </div>

    <div class="demo-section k-header">
        <ul id="treeview">
            <li>Furniture
                <ul>
                    <li>Tables & Chairs</li>
                    <li>Sofas</li>
                    <li>Occasional Furniture</li>
                    <li>Children's Furniture</li>
                    <li>Beds</li>
                </ul>
            </li>
            <li data-expanded="true">Decor
                <ul>
                    <li>Bed Linen</li>
                    <li>Throws</li>
                    <li>Curtains & Blinds</li>
                    <li>Rugs</li>
                    <li>Carpets</li>
                </ul>
            </li>
            <li>Storage
                <ul>
                    <li>Wall Shelving</li>
                    <li>Kids Storage</li>
                    <li>Baskets</li>
                    <li>Multimedia Storage</li>
                    <li>Floor Shelving</li>
                    <li>Toilet Roll Holders</li>
                    <li>Storage Jars</li>
                    <li>Drawers</li>
                    <li>Boxes</li>
                </ul>
            </li>
        </ul>
    </div>

    <script>
        $(document).ready(function() {
            var original = $("#treeview").clone(true);

            $(".configuration input").change( function() {
                var treeView = $("#treeview"),
                    clone = original.clone(true);

                treeView.parent().empty().remove();
                $(".demo-section").append(clone);

                initTreeView();
            });

            var initTreeView = function () {
                $("#treeview").width(200)
                    .kendoTreeView({
                        animation: {
                            expand: {
                                effects: getEffects()
                            }
                        }
                    });
            };

            var getEffects = function () {
                return (($("#expand")[0].checked ? "expand:vertical " : "") +
                        ($("#opacity")[0].checked ? "fadeIn" : "")) || false;
            };

            initTreeView();
        });
    </script>

    <style scoped>
        .demo-section {
            width: 200px;
        }
    </style>
</div>


    
    
</body>
</html>
